<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>MyPetStore</title>
  <link rel="icon" href="../images/title.png" sizes="32x32">
  <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css"
        media="screen"/>
  <link rel="StyleSheet" href="../css/searchProduct.css" type="text/css" media="screen"/>
  <link rel="stylesheet" href="../css/mouseEventInform.css" type="text/css" media="screen"/>
</head>
<body>
<div th:replace="common/IncludeTop">
</div>

<div id="Content">
  <div id="BackLink" >
    <a th:href="'viewProduct?productId=' + ${item.getProductId()}" th:text="'Return to ' + ${item.getProductId()}"></a>
  </div>

  <div id="Catalog">
    <table>
      <tr>
        <td><img th:src="@{${product.getPicture()}}"></td>
      </tr>
      <tr>
        <td th:text="${item.getProduct().description}"></td>
      </tr>
      <tr>
        <td><b th:text="${item.getItemId()}"></b></td>
      </tr>
      <tr>
        <td><b><font size="4">
          <span th:if="${item.getAttribute1()} != null" th:text="${item.getAttribute1()}"></span>
          <span th:if="${item.getAttribute2()} != null" th:text="${item.getAttribute2()}"></span>
          <span th:if="${item.getAttribute3()} != null" th:text="${item.getAttribute3()}"></span>
          <span th:if="${item.getAttribute4()} != null" th:text="${item.getAttribute4()}"></span>
          <span th:if="${item.getAttribute5()} != null" th:text="${item.getAttribute5()}"></span>
          <span th:if="${item.getProduct().getName()} != null" th:text="${item.getProduct().getName()}"></span>
        </font></b></td>
      </tr>
      <tr>
        <td th:text="${item.getProduct().getName()}"></td>
      </tr>
      <tr>
        <td th:if="${item.getQuantity()} <= 0" th:text="'Back ordered.'"></td>
        <td th:if="${item.getQuantity()} > 0" th:text="${item.getQuantity()} + ' in stock.'"></td>
      </tr>
      <tr>
        <td th:text="'$' + ${#numbers.formatDecimal(item.getListPrice(), 1, 2)}"></td>
      </tr>

      <tr>
        <td>
          <a th:href="@{'addItemToCart?workingItemId=' + ${item.getItemId()}}" class="Button" th:text="'Add to Cart'"></a>
        </td>
      </tr>
    </table>

  </div>

</div>

<div th:replace="common/IncludeBottom">
</div>
</body>
</html>